﻿namespace BW.IDal
{
    public interface IBaerDal<T>
    {

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="t">数据信息</param>
        /// <returns>返回受影响行数</returns>
        Task<int> AddAnync(T t);
        /// <summary>
        /// 批量新增
        /// </summary>
        /// <param name="t">数据信息</param>
        /// <returns>返回受影响行数</returns>
        Task<int> AddRangeAnync(List<T> list);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="t">数据信息</param>
        /// <returns>返回受影响行数</returns>
        Task<int> DelteAnync(T t);
        /// <summary>
        /// 批量新增
        /// </summary>
        /// <param name="t">数据信息</param>
        /// <returns>返回受影响行数</returns>
        Task<int> DelteRaangAnync(List<T> list);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="t">数据信息</param>
        /// <returns>返回受影响行数</returns>
        Task<int> UpdateAnync(T t);
        /// <summary>
        /// 批量修改
        /// </summary>
        /// <param name="t">数据信息</param>
        /// <returns>返回受影响行数</returns>
        Task<int> UpdateRangeAnync(List<T> list);

        /// <summary>
        /// 延迟
        /// </summary>
        /// <returns>返回受影响行数</returns>
        IQueryable<T> GetAllAnync();
        


    }
}
